import { getRequest, postRequest, putRequest, deleteRequest } from '@/utils/request';
/**
 * 生产订单
 * */
// 创建
export const productionPrdOrderCreate = (data) => postRequest('/production/prd-order/create', data);
export const productionPrdOrderCheckExists = (data) => postRequest('/production/prd-order/check-exists', data);
export const productionPrdOrderUpdate = (data) => putRequest('/production/prd-order/update', data);
export const productionPrdOrderDelete = (params) => deleteRequest('/production/prd-order/delete', params);
export const productionPrdOrderGet = (params) => getRequest('/production/prd-order/get', params);
export const productionPrdOrderPage = (params) => getRequest('/production/prd-order/page', params);
export const productionPrdOrderExportExcel = (params) => getRequest('/production/prd-order/export-excel', params);
export const productionPrdOrderSubmitAudit = (params) => postRequest('/production/prd-order/submit-audit', params);
export const productionPrdOrderClearSubmitAudit = (params) => postRequest('/production/prd-order/clear-submit-audit', params);
export const productionPrdOrderAudit = (params) => postRequest('/production/prd-order/audit', params);
export const productionPrdOrderClearAudit = (params) => postRequest('/production/prd-order/clear-audit', params);
export const productionPrdOrderCreateAudit = (params) => postRequest('/production/prd-order/create-audit', params);
export const productionPrdOrderUpdateAudit = (params) => putRequest('/production/prd-order/update-audit', params);
export const productionPrdOrderClose = (params) => postRequest('/production/prd-order/close', params);
export const productionPrdOrderClearClose = (params) => postRequest('/production/prd-order/clear-close', params);
export const productionMachineShiftProductOutputGetWaitOpenList = (data) => postRequest('/production/machine-shift-product-output/page-post', data);
export const productionMachineShiftProductOutputDeleteById = (data) => deleteRequest('/production/machine-shift-product-output/deleteById', data);

// 获取订单下达
export const productionProductOrderIssuedGet = (params) => getRequest('/production/product-order-issued/get', params);
export const productionProductOrderIssuedUpdate = (params) => putRequest('/production/product-order-issued/update', params);

// 后纺计划
export const productionPlanPage = (params) => getRequest('/production/plan/page', params);
export const productionPlanGet = (params) => getRequest('/production/plan/get', params);
export const productionPlanDelete = (params) => deleteRequest('/production/plan/delete', params);
export const productionPlanUpdateStatus = (params) => putRequest('/production/plan/update-status', params);

// 根据订单ID和区域ID获取后纺计划详情
export const productionPlanByOrderWorkshop = (params) => getRequest('/production/plan/by-order-workshop', params);
export const productionPrdOrderGetStateCount = (params) => getRequest('/production/prd-order/get-state-count', params);

// 订单粗纱列表
export const productionPrdOrderCoarseSandList = (params) => getRequest('/production/prd-order/coarse-sand-list', params);

// 订单预警
export const productionPrdOrderGetIfWarning = (params) => getRequest('/production/prd-order/get-if-warning', params);
export const productionPrdOrderGetWarningOrder = (params) => getRequest('/production/prd-order/get-warning-order', params);
export const productionPrdOrderHandlerWarning = (params) => postRequest('/production/prd-order/handler-warning', params);

// 增加生产订单记录
export const productionProductOrderQtyRecordCreate = (params) => postRequest('/production/product-order-qty-record/create', params);
export const productionProductOrderQtyRecordGet = (params) => getRequest('/production/product-order-qty-record/get', params);
export const productionProductOrderQtyRecordDelete = (params) => deleteRequest('/production/product-order-qty-record/delete', params);
export const productionProductOrderQtyRecordPage = (params) => getRequest('/production/product-order-qty-record/page', params);

// 获取产品库存
export const yongYouInventoryProductStockBatchTotal = (params) => getRequest('/yongyou/inventory-product-stock/batch-total', params);

/**
 * 销售订单
 * */
export const productionSaleOrderCreate = (data) => postRequest('/production/sale-order/create', data);
export const productionSaleOrderUpdate = (data) => putRequest('/production/sale-order/update', data);
export const productionSaleOrderDelete = (params) => deleteRequest('/production/sale-order/delete', params);
export const productionSaleOrderGet = (params) => getRequest('/production/sale-order/get', params);
export const productionSaleOrderPage = (params) => postRequest('/production/sale-order/page', params);
export const productionSaleOrderClose = (params) => postRequest('/production/sale-order/close', params);
export const productionSaleOrderClearClose = (params) => postRequest('/production/sale-order/clear-close', params);
export const productionSaleOrderGetStateCount = (params) => getRequest('/production/sale-order/get-state-count', params);
export const productionSaleOrderGetIds = (params) => postRequest('/production/sale-order/get-ids', params);
export const productionSaleOrderDeleteItem = (params) => deleteRequest('/production/sale-order/delete-item', params);

/**
 * 样纱配置*/
export const productionTestProductConfigPage = (params) => getRequest('/production/test-product-config/page', params);
export const productionTestProductConfigSaveOrUpdateBatch = (data) => postRequest('/production/test-product-config/save-or-update-batch', data);
/**
 * 物料档案分页*/
export const spinProductPage = (params) => getRequest('/spin/product/page', params);
export const spinProductCategoryList = (params) => getRequest('/spin/product-category/list', params);
